<div id=register_form>
	<h1>Create Account</h1>
	<?php 
		$err_str = validation_errors('<p class="error">');
		if(strlen($err_str) > 0){ 
			echo $err_str;
		}
		if(isset($db_reg_error)) echo '<p class="error">'.$db_reg_error."</p>";
	?>
	<fieldset>
		<legend>Account Information</legend>
		
		<?php  
			echo form_open('login/create_account');
			echo form_label('Account Name *', 'account');
			echo form_input('account', set_value('account'), 'autocomplete="off"') . '<br />';
			
			echo form_label('Password *', 'password');
			echo form_password('password', '', 'autocomplete="off"') . '<br />';
			
			echo form_label('Confirm Password *', 'conf_password');
			echo form_password('conf_password', '', 'autocomplete="off"') . '<br />';
	 	?>
	</fieldset>
	
	<fieldset>
		<legend>Personal Information</legend>
		
		<?php 
			echo form_label('First Name *', 'first_name');
			echo form_input('first_name', set_value('first_name'), 'autocomplete="off"') . '<br />';
			
			echo form_label('Last Name *', 'last_name');
			echo form_input('last_name', set_value('last_name'), 'autocomplete="off"') . '<br />';
			
			echo form_label('Email *', 'email');
			echo form_input('email', set_value('email'), 'autocomplete="off"') . '<br />';
			
			echo form_label('Birthday yyyy-mm-dd', 'birthday');
			echo form_input('birthday', set_value('birthday'), 'autocomplete="off"' ) . '<br />';
			
			echo form_label('Battle.Net URL', 'bnet');
			echo form_input('bnet', set_value('bnet'), 'autocomplete="off"' ) . '<br />';
			
			echo form_label('Favourite Race', 'race');
			echo form_input('race', set_value('race'), 'autocomplete="off"' ) . '<br />';
	 	?>
	</fieldset>
	
	<?php 
		//Attempt to submit new account.
		echo form_submit('submit', 'Create Account');		
	?>
</div>